#include<iostream>
#include<map>
#include<vector>
using namespace std;
typedef long long LL;

const int N = 1e5 + 10;
bool st[N];
int ans[N];
int n, k;
int main()
{
	cin >> n >> k;
	int cnt = 1;
	for (int i = n - k + 1; i <= n; i++) {
		ans[cnt] = i;
		cnt += 2;
	}
	int idx = 1;
	for (int i = 1; i <= n; i++) {
		if (!ans[i]) {
			ans[i] = idx++;
		}
	}
	for (int i = 1; i <= n; i++) {
		cout << ans[i] << " ";
	}
	return 0;
}